#define _CRT_SECURE_NO_WARNINGS 1

#include "List.h"

void Test1()
{
	LN* plist = ListInit();
	ListPushBack(plist, 1);
	ListPushBack(plist, 2);
	ListPushBack(plist, 3);
	ListPushBack(plist, 4);
	ListPrint(plist);
}

void Test2()
{
	LN* plist = ListInit();
	ListPushFront(plist, 1);
	ListPushFront(plist, 2);
	ListPushFront(plist, 3);
	ListPushFront(plist, 4);
	ListPrint(plist);
}

void Test3()
{
	LN* plist = ListInit();
	ListPushFront(plist, 1);
	ListPushFront(plist, 2);
	ListPushFront(plist, 3);
	ListPushFront(plist, 4);
	ListPopBack(plist);
	ListPrint(plist);
}

void Test4()
{
	LN* plist = ListInit();
	ListPushFront(plist, 1);
	ListPushFront(plist, 2);
	ListPushFront(plist, 3);
	ListPushFront(plist, 4);
	ListPrint(plist);
	LN* pos = ListFind(plist, 2);
	ListErase(pos);
	ListPrint(plist);

	ListDestroy(plist);
}

int main()
{
	Test4();

	return 0;
}